package intro.databases.gtCarRental.ui;

import intro.databases.gtCarRental.GTCRActivity;
import intro.databases.gtCarRental.R;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RadioGroup;

public class Home extends GTCRActivity {
	
	@Override
	public void onCreate(Bundle b) {
		super.onCreate(b);
		setContentView(R.layout.home);
	}
	
	public void next(View v) {
		RadioGroup group = (RadioGroup) findViewById(R.id.radioGroup_home_options);
		Class<?> next = null;
		switch(group.getCheckedRadioButtonId()) {
			case R.id.radioButton_home_rentCar:
				next = RentACar.class;
				break;
			case R.id.radioButton_home_personalInformation:
				next = PersonalInformation.class;
				break;
			case R.id.radioButton_home_rentalInformation:
				next = RentalHistory.class;
				break;
		}
		Intent intent = new Intent(this, next);
		startActivity(intent);		
	}
}
